{% import 'macros/form.twig' as form %}
{% import 'macros/table.twig' as table %}
{% import 'macros/misc.twig' as misc %}

<div style="position:relative;">
    <form action="{{ action }}" method="post">

        {% if accounts is defined %}
            {{ misc.Section(constant('Strings::LABEL_0016'), 'td_data_bold user') }}
            <table width="100%" cellpadding="0" cellspacing="3">
                {{ form.Fields(accounts, 'user', true, true) }}
            </table>
        {% else %}
            {% set property = 'client_account_update' %}
            {{ form.HiddenFor(property, hidden[property]) }}
        {% endif %}

        {{ misc.Section(constant('Strings::LABEL_0064'), 'td_data_bold user') }}
        <table width="100%" cellpadding="0" cellspacing="3">
            {{ form.Fields(user, 'user', true) }}

        </table>

        {{ misc.Section(constant('Strings::LABEL_0004'), 'td_data_bold user') }}
        <table width="100%" cellpadding="0" cellspacing="3">
            <tr>
                {{ form.Fields(credentials, 'user', true) }}
            </tr>
        </table>

        {% embed 'shared/misc.twig' %}
            {% block tip_content %}
                <span>{{ constant('Strings::MESSAGE_9002') }}:</span>
                <small>
                    <div>&nbsp;-&nbsp;{{ constant('Strings::MESSAGE_0018') }}</div>
                    <div>&nbsp;-&nbsp;{{ constant('Strings::MESSAGE_0017') }}</div>
                </small>
            {% endblock %}
        {% endembed %}

        {{ misc.Section(constant('Strings::LABEL_0049'), 'td_data_bold user') }}  
        <table width="100%" cellpadding="0" cellspacing="3">
            {{ form.Fields(manager, 'user', true) }}
        </table>


        <div style="margin-top:8px;padding:8px;border-top:1px solid #CCCCCC;">
            <button type="submit" onclick="/*load_img();*/">{{ constant('Strings::LABEL_0025') }}</button>
        </div>
    </form>

    <form name="{{ Delete.name }}" action="{{ Delete.action }}" method="post" style="position:absolute;right:0;bottom:0;">
        {% for item in Delete.hidden | keys %}
            {{ form.HiddenFor(item, Delete.hidden[item]) }}
        {% endfor %}
        <div style="margin-top:8px;padding:8px;">
            <button type="button" onclick="$('#dialog_user_del').dialog('open');">{{ constant('Strings::LABEL_0039') }}</button>
        </div>
    </form>
</div>